<?php
	if (isset($_GET['billtype'])) {
		// deal with type of bill, present different info for bill or chore
		if ($_POST['billType'] == 'bill') {
			if (isset($_GET['share'])) {
				if (isset($_GET['complete'])) {
					include("flatshare_php/bill_create.php");
				}
				else {
					include("flatshare_php/bill_billform2.php");
				}
			}
			else {
				include("flatshare_php/bill_billform1.php");
			}
		}
		else if ($_POST['billType'] == 'chore') {
			if (isset($_GET['share'])) {
				if (isset($_GET['complete'])) {
					include("flatshare_php/chore_create.php");
				}
				else {
					include("flatshare_php/bill_choreform2.php");
				}
			}
			else {
				include("flatshare_php/bill_choreform1.php");
			}
		}
	}
	else {
		// code to ask user for bill type
		include("flatshare_php/bill_moneyform.php");
	}
?>